home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 042a / rkpls301.zip / RKPLUS.DOC < prev    next >
Text File  |  1993-03-04  |  71KB  |  1,676 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.       ▒▒▒▒▒▒▒▒▒▒▄          ▒▒▒▒▒▒▒▒▒▄                         ▀▀█▀▀ █▀█▀█
  7.        ▒▒█▀▀▀▀▒▒█           ▒▒█▀▀▀▒▒█                           █   █ █ █
  8.        ▒▒█    ▒▒█ ▒▒▄  ▒▒▄  ▒▒█   ▒▒█ ▒▒▄     ▒▒▄ ▒▒▄ ▒▒▒▒▒▒▄   ▀   ▀ ▀ ▀
  9.        ▒▒▒▒▒▒▒▒▒█ ▒▒█ ▒▒█▀  ▒▒▒▒▒▒▒▒█ ▒▒█     ▒▒█ ▒▒█ ▒▒█▀▀▀▀
  10.        ▒▒█▀▀▒▒█▀▀ ▒▒▒▒▒█▀   ▒▒█▀▀▀▀▀▀ ▒▒█     ▒▒█ ▒▒█ ▒▒▒▒▒▒▄
  11.        ▒▒█  ▒▒█   ▒▒█▀▒▒█   ▒▒█       ▒▒█     ▒▒█▄▒▒█  ▀▀▀▒▒█ 
  12.       ▒▒▒▒█ ▒▒▒▒█ ▒▒█  ▒▒█ ▒▒▒▒█      ▒▒▒▒▒▒▄ ▒▒▒▒▒▒█ ▒▒▒▒▒▒█ 
  13.        ▀▀▀▀  ▀▀▀▀  ▀▀   ▀▀  ▀▀▀▀       ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀▀▀▀▀ 
  14.  
  15.                             ▒▒▒▒▒▒▒▒▄     ▒▒▒▒▒▒▒▒▄
  16.                             ▒▒█▀▀▀▒▒█     ▒▒█▀▀▀▒▒█
  17.                              ▀▀   ▒▒█     ▒▒█   ▒▒█
  18.                                ▒▒▒▒▒█     ▒▒█   ▒▒█
  19.                                 ▀▀▒▒█     ▒▒█   ▒▒█
  20.                             ▒▒▄   ▒▒█     ▒▒█   ▒▒█
  21.                             ▒▒▒▒▒▒▒▒█ ▒▒▄ ▒▒▒▒▒▒▒▒█
  22.                              ▀▀▀▀▀▀▀▀  ▀▀  ▀▀▀▀▀▀▀▀
  23.  
  24.  
  25.                     Turbo Pascal (tm) Registration Key Unit
  26.                                by C. Scott Davis
  27.                         (c) 1991-93 Serious Cybernetics
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.   _______________   ┌─────┐                                                                                                                
  43.  (               )  │                                                               
  44.   \                 └─────┐ ┬──┐ ┬──┐ ─┬─ ┌──┐ ┬  ┬ ┌──┐                       
  45.     \         /           │ ├─   ├─┬┘  │  │  │ │  │ └──┐                       
  46.       \     /       └─────┘ ┴──┘ ┴ ┴─ ─┴─ └──┘ └──┘ └──┘                       
  47.         \ /         ┌─────┐                                                    
  48.         / \         │                                                          
  49.       /     \       │       ┬  ┬ ┬─┐  ┬──┐ ┬──┐ ┌─┐ ┬ ┬──┐ ┌─┬─┐ ─┬─ ┌──┐ ┌──┐ 
  50.     /         \     │       └──┤ ├─┴┐ ├─   ├─┬┘ │ │ │ ├─     │    │  │    └──┐ 
  51.    (___________ \   └─────┘ └──┘ ┴──┘ ┴──┘ ┴ ┴─ ┴ └─┘ ┴──┘   ┴   ─┴─ └──┘ └──┘ 
  52.  (_______________)  Box 35 * Alto, GA  30510-0035 * USA
  53.  
  54. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page i
  55.           
  56.  
  57.                       T A B L E   O F   C O N T E N T S
  58.  
  59.       ═══════════════════════════════════════════════════════════════════
  60.  
  61.         Sec    D e s c r i p t i o n                               Page
  62.  
  63.                Table of Contents .................................. i
  64.         1.0    What Is RkPlus? .................................... 1
  65.         2.0    Getting Started With RkPlus ........................ 1
  66.         3.0    Five Methods Of Using RkPlus ....................... 2
  67.         4.0    RkPlus Type Definitions ............................ 2
  68.         5.0    RkPlus Constants ................................... 3
  69.         6.0    RkPlus Variables ................................... 3
  70.         7.0    RkPlus Functions And Procedures .................... 4
  71.         8.0    Detailed Type Information .......................... 4
  72.         8.1    RkpRec ............................................. 4
  73.         8.2    EncFuncType ........................................ 5
  74.         9.0    Detailed Constant Information ...................... 5
  75.         9.1    NoError ............................................ 5
  76.         9.2    FileNotFound ....................................... 5
  77.         9.3    PathNotFound ....................................... 5
  78.         9.4    TooManyFiles ....................................... 6
  79.         9.5    AccessDenied ....................................... 6
  80.         9.6    InvalidFile ........................................ 6
  81.         9.7    InvalidRecord / RecordNotFound ..................... 6
  82.         9.8    InvalidParameter ................................... 6
  83.         9.9    VersionMismatch .................................... 7
  84.         9.10   NoEncodeFunc ....................................... 7
  85.         9.11   InvalidKey ......................................... 7
  86.         9.12   ExpiredKey ......................................... 7
  87.         9.13   BadTPU ............................................. 7
  88.         10.0   Detailed Variable Information ...................... 8
  89.         10.1   BaseYear ........................................... 8
  90.         10.2   UseExpDays ......................................... 8
  91.         10.3   UseExePath ......................................... 8
  92.         10.4   KeyFileSize ........................................ 9
  93.         10.5   Rkp.Registered ..................................... 9
  94.         10.6   Rkp.ID ............................................. 10
  95.         10.7   Rkp.Name1 .......................................... 10
  96.         10.8   Rkp.Name2 .......................................... 11
  97.         10.9   Rkp.Name3 .......................................... 12
  98.         10.10  Rkp.Message ........................................ 12
  99.         10.11  Rkp.Level .......................................... 13
  100.         10.12  Rkp.ExpYear / Rkp.ExpMonth / Rkp.Day ............... 14
  101.         10.13  Rkp.Key ............................................ 15
  102.  
  103. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page ii
  104.  
  105.  
  106.                       T A B L E   O F   C O N T E N T S
  107.  
  108.       ═══════════════════════════════════════════════════════════════════
  109.  
  110.         Sec    D e s c r i p t i o n                               Page
  111.  
  112.         11.0   Detailed Procedure And Function Information ........ 15
  113.         11.1   RkPlusVer .......................................... 15
  114.         11.2   BadSystemDate ...................................... 16
  115.         11.3   RkpOK .............................................. 16
  116.         11.4   RkpError ........................................... 17
  117.         11.5   SetEncode .......................................... 17
  118.         11.6   SetKeyFile ......................................... 18
  119.         11.7   KeyFileName ........................................ 18
  120.         11.8   ExeFileName ........................................ 19
  121.         11.9   GetKeyFileSize ..................................... 19
  122.         11.10  MakeKey ............................................ 20
  123.         11.11  ValidKey ........................................... 21
  124.         11.12  SetRegInfo ......................................... 22
  125.         11.13  CreateKey .......................................... 23
  126.         11.14  VerifyKey .......................................... 24
  127.         11.15  GetRegInfo ......................................... 25
  128.         11.16  SaveRegInfo ........................................ 26
  129.         11.17  BrandRegInfo ....................................... 27
  130.         12.0   Additional Information On RkPlus ................... 28
  131.         13.0   RkPlus Source Code Availability .................... 28
  132.         14.0   What's Next For RkPlus? ............................ 28
  133.         15.0   ShareWare Notice And Registration .................. 29
  134.         16.0   RkPlus Support ..................................... 29
  135.         17.0   Credits ............................................ 30
  136.         18.0   Turbo Pascal (tm) Units from Serious Cybernetics ... 31
  137.         19.0   Other Recommended Turbo Pascal (tm) Units .......... 31
  138.         20.0   Copyright Notices .................................. 31
  139.         21.0   Index .............................................. 32
  140.  
  141. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 1
  142.  
  143.  
  144. 1.0 - What is RkPlus?
  145.  
  146. RkPlus is an enhanced version of our original rKey Registration Key Unit.  It 
  147. is a Turbo Pascal (tm) Unit designed to allow programmers to easily handle 
  148. secure registration keys in their software.  All of the key encryption, 
  149. checking, and key file routines are handled in RkPlus, requiring little effort 
  150. on the part of the programmer.  RkPlus can allow anything from simple 
  151. registration messages to multiple registration levels, limited use demo keys, 
  152. and custom written encoding functions.
  153.  
  154. There are five versions of RkPlus included within the RKPLUS30.ZIP distribution
  155. archive.  RKP50TPU.ZIP contains the Turbo Pascal (tm) 5.0 version, RKP55TPU.ZIP
  156. contains the Turbo Pascal (tm) 5.5 version, RKP60TPU.ZIP contains the Turbo 
  157. Pascal (tm) 6.0 version, RKP10TPU.ZIP contains the Turbo Pascal (tm) 1.0 for 
  158. Windows (tm) version, and RKP15TPU.ZIP contains the Turbo Pascal (tm) 1.5 for 
  159. Windows (tm) version.  If you don't feel that you need all of the enhanced 
  160. features of RkPlus, then you may wish to obtain a copy of the smaller rKey 
  161. unit.  The latest version of rKey and RkPlus (as well as other Serious 
  162. Cybernetics software) are always available for download and FidoNet file 
  163. request from the Phoenix StarFighter BBS (see phone number and FidoNet address 
  164. below).
  165.  
  166. Also contained in these archives are applicable versions of the Rkp2Enc and 
  167. Rkp3Enc units, which contain ready-to-use encoding functions (keys created 
  168. using Rkp2Enc are compatible with RkPlus 2.x).  You can use either of the 
  169. encoding units (Rkp2Enc or Rkp3Enc) as is, or write your own custom encoding 
  170. functions (see "SetEncode" in section 11.5).
  171.  
  172. Within this documentation are many examples and Turbo Pascal (tm) code 
  173. segments. All such segments are enclosed in single line boxes to help 
  174. differentiate them from other notes.
  175.  
  176.  
  177. 2.0 - Getting Started with RkPlus
  178.  
  179. There are basically 3 approaches to using RkPlus :
  180.  
  181. 1)  If you have an existing programme written using RkPlus version 2.x (2.0 to 
  182. 2.4), and you want to maintain compatibility with your existing keys, you can 
  183. simply use the Rkp2Enc unit.  This unit contains RkPlus version 2.x/compatible 
  184. encoding routines and automatically interfaces itself with RkPlus.
  185.  
  186. 2)  If you don't want to write your own encoding functions (but don't require 
  187. RkPlus 2.x compatibility), you can simply use the Rkp3Enc unit.  This unit 
  188. contains new RkPlus version 3.x encoding routines and automatically interfaces 
  189. itself with RkPlus.
  190.  
  191. 3)  If you want to be totally assured of the uniqueness and security of your
  192. keys, you can write your own encoding functions and specify them with the
  193. SetEncode procedure (see "SetEncode" in section 11.5).  This is somewhat more
  194. involved that the first approach, but gives you more control of key
  195. generation.
  196.  
  197. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 2
  198.  
  199.  
  200. 3.0 - Five Methods of Using RkPlus
  201.  
  202. The various sample programmes demonstrate 5 methods of handling keys :
  203.  
  204. 1)  Distribute your programme (see SAMPLE1.PAS) and use a key file generation 
  205. programme (see GENFILE.PAS), which you do NOT distribute, to create a key file 
  206. for each user who registers.  You then send the user the key file.
  207.  
  208. 2)  Distribute your programme (see SAMPLE1.PAS) and a registration programme 
  209. (see REGISTER.PAS).  You then use a key generation programme (see GENKEY.PAS), 
  210. which you do NOT distribute, to create a key number for each user who 
  211. registers.  You then send the user the key number, which he/she enters into the
  212. registration programme to create a key file.
  213.  
  214. 3)  Distribute your programme (see SAMPLE2.PAS), which has it's own 
  215. registration routine.  You then use a key generation programme (see 
  216. GENKEY.PAS), which you do NOT distribute, to create a a key number for each 
  217. user who registers.  You then send the user the key number, which he/she enters
  218. into the programme to create a key file.
  219.  
  220. 4)  Distribute your programme (see SAMPLE3.PAS), which has its own 
  221. configuration file.  You then use a key generation programme (see GENKEY.PAS), 
  222. which you do NOT distribute, to create a a key number for each user who 
  223. registers.  You then send the user the key number, which he/she enters into the
  224. configuration file. There is no key file required with this method.
  225.  
  226. 5)  Distribute your programme (see SAMPLE4.PAS) and a branding programme (see 
  227. BRAND.PAS).  You then use a key generation programme (see GENKEY.PAS), which 
  228. you do NOT distribute, to create a key number for each user who registers. 
  229. You then send the user the key number, which he/she enters into the branding 
  230. programme to write the registration information directly into the EXE file.
  231.  
  232.  
  233. 4.0 - RkPlus Type Definitions
  234.  
  235. The following Types are defined in RkPlus.  See section 8 for details on each.
  236.  
  237. RkpRec
  238. EncFuncType
  239.  
  240. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 3
  241.  
  242.  
  243. 5.0 - RkPlus Constants
  244.  
  245. The following Constants are defined in RkPlus.  See section 9 for details on
  246. each.
  247.  
  248. NoError
  249. FileNotFound
  250. PathNotFound
  251. TooManyFiles
  252. AccessDenied
  253. InvalidFile
  254. InvalidRecord
  255. RecordNotFound
  256. InvalidParameter
  257. VersionMismatch
  258. NoEncodeFunc
  259. InvalidKey
  260. ExpiredKey
  261. BadTPU
  262.  
  263.  
  264. 6.0 - RkPlus Variables
  265.  
  266. The following Variables are defined in RkPlus.  See section 10 for details on
  267. each.
  268.  
  269. BaseYear
  270. UseExpDays
  271. UseExePath
  272. KeyFileSize
  273. Rkp
  274.  
  275. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 4
  276.  
  277.  
  278. 7.0 - RkPlus Procedures and Functions
  279.  
  280. The following Procedures and Functions are defined in RkPlus.  See section 11
  281. for details on each.
  282.  
  283. Functions:
  284.   RkPlusVer
  285.   BadSystemDate
  286.   RkpOK
  287.   RkpError
  288.   KeyFileName
  289.   ExeFileName
  290.   GetKeyFileSize
  291.   MakeKey
  292.   ValidKey
  293.  
  294. Procedures:
  295.   SetEncode
  296.   SetKeyFile
  297.   SetRegInfo
  298.   CreateKey
  299.   VerifyKey
  300.   GetRegInfo
  301.   SaveRegInfo
  302.   BrandRegInfo
  303.  
  304.  
  305. 8.0 - Detailed Type Information
  306.  
  307. This section contains detailed information on all Types defined in RkPlus.
  308.  
  309.  
  310. 8.1 - RkpRec
  311.  
  312. ┌──────────────────────────────────────────┐
  313. │ RkpRec      = Record                     │
  314. │                 Registered : Boolean;    │
  315. │                 ID         : String[36]; │
  316. │                 Name1      : String[36]; │
  317. │                 Name2      : String[36]; │
  318. │                 Name3      : String[36]; │
  319. │                 Message    : String[36]; │
  320. │                 Level      : Byte;       │
  321. │                 ExpYear    : Word;       │
  322. │                 ExpMonth   : Byte;       │
  323. │                 ExpDay     : Byte;       │
  324. │                 Key        : String[12]; │
  325. │               End;                       │
  326. └──────────────────────────────────────────┘
  327.  
  328. RkpRec is the Type used by the variable Rkp, which contains the registration
  329. information (see "Detailed Variable Information" in section 10).
  330.  
  331. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 5
  332.  
  333.  
  334. 8.2 - EncFuncType
  335.  
  336. ┌──────────────────────────────────────────────────────────────────────────┐
  337. │ EncFuncType = Function(t1,t2,t3 : String; l : Byte; i : Integer) : Word; │
  338. └──────────────────────────────────────────────────────────────────────────┘
  339.  
  340. EncFuncType is the function type used to define a custom encoding function
  341. (see "SetEncode" in section 11.5).
  342.   
  343.  
  344. 9.0 - Detailed Constant Information
  345.  
  346. This section contains detailed information on all Constants interfaced by
  347. RkPlus.  The constants defined by RkPlus are used to define values that may be
  348. returned by RkpError (Section 11.4).  In addition to those defined as
  349. constants, error codes $0001 to $00FF correspond to the values returned by the
  350. Turbo Pascal (tm) IoResult function.
  351.  
  352.  
  353. 9.1 - NoError
  354.  
  355. ┌───────────────────────────┐
  356. │ NoError          = $0000; │
  357. └───────────────────────────┘
  358.  
  359. If RkpError returns NoError then no error has occurred.  If this is the case,
  360. then RkpOK will also return True.  If RkpError returns any non-zero value,
  361. then RkpOK will return False.
  362.  
  363.  
  364. 9.2 - FileNotFound
  365.  
  366. ┌───────────────────────────┐
  367. │ FileNotFound     = $0002; │
  368. └───────────────────────────┘
  369.  
  370. If RkpError returns FileNotFound then the previous function or procedure was
  371. unable to find a required file.
  372.  
  373.  
  374. 9.3 - PathNotFound
  375.  
  376. ┌───────────────────────────┐
  377. │ PathNotFound     = $0003; │
  378. └───────────────────────────┘
  379.  
  380. If RkpError returns PathNotFound then the previous function or procedure was
  381. unable to find the path of a required file.
  382.  
  383. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 6
  384.  
  385.  
  386. 9.4 - TooManyFiles
  387.  
  388. ┌───────────────────────────┐
  389. │ TooManyFiles     = $0004; │
  390. └───────────────────────────┘
  391.  
  392. If RkpError returns TooManyFiles then RkPlus was unable to open a file because
  393. not enough file handles were defined in CONFIG.SYS.
  394.  
  395.  
  396. 9.5 - AccessDenied
  397.  
  398. ┌───────────────────────────┐
  399. │ AccessDenied     = $0005; │
  400. └───────────────────────────┘
  401.  
  402. If RkpError returns AccessDenied then an attempt was made to write to a Read
  403. Only file or a currently open shared file.
  404.  
  405.  
  406. 9.6 - InvalidFile
  407.  
  408. ┌───────────────────────────┐
  409. │ InvalidFile      = $0101; │
  410. └───────────────────────────┘
  411.  
  412. If RkpError returns InvalidFile then the previous function or procedure
  413. attempted to process a file that is not a valid RkPlus file.
  414.  
  415.  
  416. 9.7 - InvalidRecord / RecordNotFound
  417.  
  418. ┌───────────────────────────┐
  419. │ InvalidRecord    = $0102; │
  420. │ RecordNotFound   = $0103; │
  421. └───────────────────────────┘
  422.  
  423. These errors are not returned by RkpError, but are included for future use and
  424. compatibility with other Serious Cybernetics units.
  425.  
  426.  
  427. 9.8 - InvalidParameter
  428.  
  429. ┌───────────────────────────┐
  430. │ InvalidParameter = $0201; │
  431. └───────────────────────────┘
  432.  
  433. If RkpError returns InvalidParameter, then the previous function or procedure
  434. was passed invalid data.
  435.  
  436. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 7
  437.  
  438.  
  439. 9.9 - VersionMismatch
  440.  
  441. ┌───────────────────────────┐
  442. │ VersionMismatch  = $0202; │
  443. └───────────────────────────┘
  444.  
  445. This error is not currently used by RkPlus, but is included for future use and 
  446. is presently used by the encoding units (Rkp2Enc and Rkp3Enc).
  447.  
  448.  
  449. 9.10 - NoEncodeFunc
  450.  
  451. ┌───────────────────────────┐
  452. │ NoEncodeFunc     = $0301; │
  453. └───────────────────────────┘
  454.  
  455. If RkpError returns NoEncodeFunc then you are attempting to use RkPlus without 
  456. either providing a custom encode function or using one of the encoding units 
  457. (Rkp2Enc or Rkp3Enc), both of which automatically set their encode functions.
  458.  
  459.  
  460. 9.11 - InvalidKey
  461.  
  462. ┌───────────────────────────┐
  463. │ InvalidKey       = $0302; │
  464. └───────────────────────────┘
  465.  
  466. If RkpError returns InvalidKey then the current key in the Rkp record
  467. (Rkp.Key) is not valid.
  468.  
  469.  
  470. 9.12 - ExpiredKey
  471.  
  472. ┌───────────────────────────┐
  473. │ ExpiredKey       = $0303; │
  474. └───────────────────────────┘
  475.  
  476. If RkpError returns ExpiredKey then the current key in the Rkp record
  477. (Rkp.Key) has expired.
  478.  
  479.  
  480. 9.13 - BadTPU
  481.  
  482. ┌───────────────────────────┐
  483. │ BadTPU           = $FFFF; │
  484. └───────────────────────────┘
  485.  
  486. If RkpError returns BadTPU then the RKPLUS.TPU file is corrupt or has been
  487. tampered with and SHOULD BE REPLACED IMMEDIATELY.
  488.  
  489. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 8
  490.  
  491.  
  492. 10.0 - Detailed Variable Information
  493.  
  494. This section contains detailed information on all Variables interfaced by
  495. RkPlus.
  496.  
  497.  
  498. 10.1 - BaseYear
  499.  
  500. ┌──────────────────┐
  501. │ BaseYear : Word; │
  502. └──────────────────┘
  503.  
  504. This variable contains the base year that will be used when calculating 
  505. expiration keys.  It is initialised to 1992 by RkPlus.  It is VERY important 
  506. that the value of BaseYear be the same in the programme that generated the key 
  507. and the programme that uses it, otherwise expiration dates will be calculated 
  508. incorrectly.
  509.  
  510. Example :
  511.  
  512. ┌───────────────────┐
  513. │ BaseYear := 1990; │
  514. └───────────────────┘
  515.  
  516. All expiration dates will be calculated and stored as offsets from 1-Jan-1990.
  517.  
  518.  
  519. 10.2 - UseExpDays
  520.  
  521. ┌───────────────────────┐
  522. │ UseExpDays : Boolean; │
  523. └───────────────────────┘
  524.  
  525. This variable determines whether expiration days will be included in
  526. expiration dates for keys.  If UseExpDays is True (default), then expiration
  527. days will be included (allowing a valid range of 21 years).  If UseExpDays is
  528. False, then expiration days will not be included (allowing a valid range of
  529. 304 years).  If expiration days are not used, keys will expire on the first
  530. day of the expiration month.  The Rkp2Enc unit sets UseExpDays to False to
  531. maintain compatibility with RkPlus version 2.x keys.
  532.  
  533.  
  534. 10.3 - UseExePath
  535.  
  536. ┌───────────────────────┐
  537. │ UseExePath : Boolean; │
  538. └───────────────────────┘
  539.  
  540. This variable controls how RkPlus handles filenames with no specified path. If
  541. UseExePath is True (default), then RkPlus will use the path that the programme
  542. was executed from if no path is specified.  If UseExePath is False, then
  543. RkPlus will use the current path if no path is specified.
  544.  
  545. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 9
  546.  
  547.  
  548. 10.4 - KeyFileSize
  549.  
  550. ┌────────────────────────┐
  551. │ KeyFileSize : Integer; │
  552. └────────────────────────┘
  553.  
  554. This variable is used by SaveRegInfo to determine the size of the key file
  555. when it is created.  If KeyFileSize is less than or equal to 337 (the number
  556. of bytes used by RkPlus), the file will be 337 bytes long.  However, if
  557. KeyFileSize is greater than 337, random bytes will be appended to the key file
  558. to cause it to be KeyFileSize bytes long.
  559.  
  560. Example :
  561.  
  562. ┌──────────────────────┐
  563. │ KeyFileSize := 1024; │
  564. │ Randomize;           │
  565. └──────────────────────┘
  566.  
  567. Any future calls to SaveRegInfo will result in a key file that has been padded
  568. to 1024 bytes.
  569.  
  570. Note:  RkPlus does NOT automatically randomize the seed number used to generate
  571. the random bytes that are appended to the key file.  In order to have true 
  572. random values, your programme must call the Randomize procedure before 
  573. SaveRegInfo is called.  If you are not using KeyFileSize (it is less than or 
  574. equal to 337), then you do not need to call Randomize (since no random bytes 
  575. will be appended).
  576.  
  577.  
  578. 10.5 - Rkp.Registered
  579.  
  580. ┌───────────────────────────┐
  581. │ Rkp.Registered : Boolean; │
  582. └───────────────────────────┘
  583.  
  584. This field of the Rkp record is initialised by RkPlus to False.  It is set by
  585. CreateKey, VerifyKey, GetRegInfo, SaveRegInfo, and BrandRegInfo to True if the
  586. current key contained in Rkp.Key is valid and has not expired.
  587.  
  588. Example :
  589.  
  590. ┌────────────────────────┐
  591. │ If Rkp.Registered then │
  592. └────────────────────────┘
  593.  
  594. The code following would only be executed if the programme has been
  595. registered. This assumes, of course, that an RkPlus procedure (such as
  596. GetRegInfo or VerifyKey) has been called previously.
  597.  
  598. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 10
  599.  
  600.  
  601. 10.6 - Rkp.ID
  602.  
  603. ┌──────────────────────┐
  604. │ Rkp.ID : String[36]; │
  605. └──────────────────────┘
  606.  
  607. This variable is initialised by RkPlus to ''.  Rkp.ID is not used by RkPlus,
  608. and has no effect on key encryption.  However, it is read from the key file by
  609. GetRegInfo, written to the key file by SaveRegInfo, and branded into the EXE
  610. file by BrandRegInfo.  This will normally be used to ID your key files, so
  611. that your programme can distinguish its own key files from those of other
  612. programmes. However, since it is not used in the encryption of the
  613. registration key, it can be used to store any information that you want.
  614.  
  615. Example :
  616.  
  617. ┌───────────────────────────────────────────────────────┐
  618. │ If (Rkp.ID <> 'RkData') then                          │
  619. │   WriteLn('Error!  This is NOT an RkData key file!'); │
  620. └───────────────────────────────────────────────────────┘
  621.  
  622. If Rkp.ID doesn't equal 'RkData' then the message 'Error!  This is NOT an
  623. RkData key file!' will be displayed.
  624.  
  625.  
  626. 10.7 - Rkp.Name1
  627.  
  628. ┌─────────────────────┐
  629. │ Rkp.Name1 : String; │
  630. └─────────────────────┘
  631.  
  632. This variable is initialised by RkPlus to ''.  It is used (along with
  633. Rkp.Name2 and Rkp.Name3) in the encryption of the registration key by
  634. CreateKey, VerifyKey, SaveRegInfo (which also writes it to the key file), and
  635. BrandRegInfo (which also brands it to the EXE file).  It is read from the key
  636. file by GetRegInfo.  This will normally contain the name of the person that
  637. the software is registered to.
  638.  
  639. Example :
  640.  
  641. ┌───────────────────────────────────────┐
  642. │ If Rkp.Registered then                │
  643. │   WriteLn('Registered to ',Rkp.Name1) │
  644. │ Else                                  │
  645. │   WriteLn('Unregistered')             │
  646. └───────────────────────────────────────┘
  647.  
  648. If the programme is registered, it will display the name of the person it is
  649. registered to.  Otherwise, it will display "Unregistered".
  650.  
  651. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 11
  652.  
  653.  
  654. 10.8 - Rkp.Name2
  655.  
  656. ┌─────────────────────┐
  657. │ Rkp.Name2 : String; │
  658. └─────────────────────┘
  659.  
  660. This variable is initialised by RkPlus to ''.  It is used (along with
  661. Rkp.Name1 and Rkp.Name3) in the encryption of the registration key by
  662. CreateKey, VerifyKey, SaveRegInfo (which also writes it to the key file), and
  663. BrandRegInfo (which also brands in to the EXE file).  It is read from the key
  664. file by GetRegInfo.  This may contain a company name, a BBS name, or any
  665. additional information that you want to use in key encryption.
  666.  
  667. Example :
  668.  
  669. ┌────────────────────────────────────────────┐
  670. │ If Rkp.Registered then Begin               │
  671. │   WriteLn('Registered to ',Rkp.Name1,'.'); │
  672. │   WriteLn('For use at ',Rkp.Name2,'.');    │
  673. │ End Else                                   │
  674. │   WriteLn('Remember to Register!');        │
  675. └────────────────────────────────────────────┘
  676.  
  677. If the programme is registered, it will display the name and company of the
  678. user that it is registered to.  Otherwise, it will display "Remember to
  679. Register!".
  680.  
  681. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 12
  682.  
  683.  
  684. 10.9 - Rkp.Name3
  685.  
  686. ┌─────────────────────┐
  687. │ Rkp.Name3 : String; │
  688. └─────────────────────┘
  689.  
  690. This variable is initialised by RkPlus to ''.  It is used (along with
  691. Rkp.Name1 and Rkp.Name2) in the encryption of the registration key by
  692. CreateKey, VerifyKey, SaveRegInfo (which also writes it to the key file), and
  693. BrandRegInfo (which also brands it into the EXE file).  It is read from the
  694. key file by GetRegInfo.  This may contain a customer number, address, or any
  695. additional information that you want to use in key encryption.
  696.  
  697. Example :
  698.  
  699. ┌────────────────────────────────────────┐
  700. │ If Rkp.Registered then Begin           │
  701. │   WriteLn('Registered to ',Rkp.Name1); │
  702. │   WriteLn('              ',Rkp.Name2); │
  703. │   WriteLn('              ',Rkp.Name3); │
  704. │ End Else                               │
  705. │   WriteLn('Unregistered')              │
  706. └────────────────────────────────────────┘
  707.  
  708. If the programme is registered, it will display the name of the person it is
  709. registered to followed by a 2 line address (from Rkp.Name2 and Rkp.Name3).
  710. Otherwise, the message 'Unregistered' will be displayed.
  711.  
  712.  
  713. 10.10 - Rkp.Message
  714.  
  715. ┌───────────────────────────┐
  716. │ Rkp.Message : String[36]; │
  717. └───────────────────────────┘
  718.  
  719. This variable is initialised by RkPlus to ''.  Rkp.Message is not used by
  720. RkPlus, and has no effect on key encryption.  However, it is read from the
  721. .RKP file by GetRegInfo, written to the key file by SaveRegInfo, and branded
  722. to the EXE file by BrandRegInfo.  This will normally be used to ID your key
  723. files, so that your programme can distinguish your key files from those of
  724. other programers/companies.  However, since it is not used in the encryption
  725. of the registration key, it can be used to store any information that you
  726. want.
  727.  
  728. Example :
  729.  
  730. ┌───────────────────────────────────────────────────────────────────┐
  731. │ If(Rkp.Message <> 'Serious Cybernetics') then                     │
  732. │   WriteLn('Error!  This is NOT a Serious Cybernetics key file!'); │
  733. └───────────────────────────────────────────────────────────────────┘
  734.  
  735. If Rkp.Message doesn't equal 'Serious Cybernetics', then the message 'Error!
  736. This is NOT a Serious Cybernetics key file!' will be displayed.
  737.  
  738. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 13
  739.  
  740.  
  741. 10.11 - Rkp.Level
  742.  
  743. ┌───────────────────┐
  744. │ Rkp.Level : BYTE; │
  745. └───────────────────┘
  746.  
  747. This variable is initialised by RkPlus to 0.  It is used in the encryption of
  748. the registration key by CreateKey, VerifyKey, SaveRegInfo (which also writes
  749. it to the key file), and BrandRegInfo (which also brands it to the EXE file).
  750. It is read from the key file by GetRegInfo. If you don't wish to use
  751. registration levels, Rkp.Level should always be 0.
  752.  
  753. Example :
  754.  
  755. ┌─────────────────────────────────┐
  756. │ If Rkp.Level > 0 then           │
  757. │   WriteLn('[G]raphs');          │
  758. │ If Rkp.Level > 1 then           │
  759. │   WriteLn('[O]ther functions'); │
  760. └─────────────────────────────────┘
  761.  
  762. If the registration level is greater than 0 then the menu option "[G]raphs"
  763. would be displayed.  If the registration level is greater than 1 then the menu
  764. option "[O]ther functions" would also be displayed.
  765.  
  766. Note : Unlike the expiration date, which is binary encoded into the key number 
  767. (after the encoding functions are called) and therefore can be extracted from 
  768. any given key number, the registration level is only used for the encryption of
  769. the key, and is stored in the key file but can not be extracted from a key 
  770. number itself.  Therefore, if you use registration levels, you will need to 
  771. make sure that the brand programme or key file creation programme knows, or can
  772. determine, the registration level, because it can NOT be extracted from the key
  773. number alone (see SAMPLE2.PAS, REGISTER.PAS, and BRAND.PAS for examples).
  774.  
  775. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 14
  776.  
  777.  
  778. 10.12 - Rkp.ExpYear, Rkp.ExpMonth, Rkp.Day
  779.  
  780. ┌──────────────────────┐
  781. │ Rkp.ExpYear  : Word; │
  782. │ Rkp.ExpMonth : Byte; │
  783. │ Rkp.ExpDay   : Byte; │
  784. └──────────────────────┘
  785.  
  786. These variables are initialised by RkPlus to 0.  They are binary-encoded into
  787. the registration key by CreateKey, SaveRegInfo, and BrandRegInfo.  They are
  788. decoded from the registration key by VerifyKey and GetRegInfo.  Valid values
  789. for Rkp.ExpYear are 0 (No expiration) or BaseYear+1 to BaseYear+340 (if
  790. UseExpDays is False) or BaseYear+1 to BaseYear+21 (if UseExpDays is True) .
  791. Valid values for Rkp.ExpMonth are 0 (No expiration) or 1 to 12.  Valid values
  792. for Rkp.ExpDay are 0 (No expiration) or even days 2 to 30 (if UseExpDays is
  793. True). If you don't wish to use expiration dates, Rkp.ExpYear, Rkp.ExpMonth,
  794. and Rkp.ExpDay should always be 0.
  795.  
  796. Example :
  797.  
  798. ┌─────────────────────────────────────────────────────────────────────────────┐
  799. │ Const                                                                       │
  800. │  Months : Array[1..12] of String[3] =                                       │
  801. │  ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'); │
  802. │                                                                             │
  803. │ BaseYear := 1990;                                                           │
  804. │ UseExpDays := False;                                                        │
  805. │ .                                                                           │
  806. │ . { rest of programme would be here }                                       │
  807. │ .                                                                           │
  808. │ If (RkpError = ExpiredKey) then                                             │
  809. │   WriteLn('Your key expired 1-',Months(Rkp.ExpMonth),'-',Rkp.ExpYear)       │
  810. │ Else If Rkp.Registered then                                                 │
  811. │   WriteLn('Your key will expire 1-',Months(Rkp.ExpMonth),'-',Rkp.ExpYear);  │
  812. └─────────────────────────────────────────────────────────────────────────────┘
  813.  
  814. If the key has expired, the date that the key expired is displayed.
  815. Otherwise, if the programme is registered, the date that the key will expire
  816. is displayed.
  817.  
  818. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 15
  819.  
  820.  
  821. 10.13 - Rkp.Key
  822.  
  823. ┌───────────────────────┐
  824. │ Rkp.Key : String[12]; │
  825. └───────────────────────┘
  826.  
  827. This variable is initialised by RkPlus to '000000000000'.  It is set by
  828. CreateKey and GetRegInfo.  It is used by VerifyKey, SaveRegInfo, and
  829. BrandRegInfo.  This contains the 12 digit alphanumeric registration key as a
  830. string.
  831.  
  832. Example :
  833.  
  834. ┌───────────────────────────────────────────────────────────┐
  835. │ If Rkp.Registered then Begin                              │
  836. │   WriteLn('Registered to ',Rkp.Name1,'.');                │
  837. │   WriteLn('Registration key is ',Rkp.Key,'.');            │
  838. │ End Else                                                  │
  839. │   WriteLn('Not registered.');                             │
  840. │   WriteLn('Please read the READ.ME file for more info.'); │
  841. │ End;                                                      │
  842. └───────────────────────────────────────────────────────────┘
  843.  
  844. If the programme is registered, the name of the person that it is registered
  845. to, and the registration key will be displayed.  Otherwise, a message will be
  846. displayed telling the user how to register the programme.
  847.  
  848.  
  849. 11.0 - Detailed Procedure And Function Information
  850.  
  851. The following procedure and functions are available when using the RkPlus TPU:
  852.  
  853.  
  854. 11.1 - RkPlusVer
  855.  
  856. ┌──────────────────────────────┐
  857. │ Function RkPlusVer : String; │
  858. └──────────────────────────────┘
  859.  
  860. RkPlusVer returns the current version of RkPlus.
  861.  
  862. Example :
  863.  
  864. ┌──────────────────────────────┐
  865. │ WriteLn('using ',RkPlusVer); │
  866. └──────────────────────────────┘
  867.  
  868. will display "using RkPlus 3.0".
  869.  
  870. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 16
  871.  
  872.  
  873. 11.2 - BadSystemDate
  874.  
  875. ┌───────────────────────────────────┐
  876. │ Function BadSystemDate : Boolean; │
  877. └───────────────────────────────────┘
  878.  
  879. This Function will return True if the current system date is 1-Jan-1980 (which
  880. usually indicates that the date was not set on the PC), or False if the
  881. current system date is anything other than 1-Jan-1980.
  882.  
  883. The main purpose for this Function is for use with limited keys (with embedded
  884. expiration dates).  By calling BadSystemDate, your programme can handle
  885. situations where the system date was not set (which would cause expiration
  886. dates to be meaningless).
  887.  
  888. Example :
  889.  
  890. ┌────────────────────────────────────────────┐
  891. │ If BadSystemDate then Begin                │
  892. │   WriteLn('The system date must be set!'); │
  893. │   Halt(1);                                 │
  894. │ End;                                       │
  895. └────────────────────────────────────────────┘
  896.  
  897. If the system date was not set (BadSystemDate returns True) then display a
  898. message and exit with an ErrorLevel of 1.
  899.  
  900.  
  901. 11.3 -  RkpOK
  902.  
  903. ┌───────────────────────────┐
  904. │ Function RkpOK : Boolean; │
  905. └───────────────────────────┘
  906.  
  907. RkpOK will return True if the result of the last procedure or function was
  908. NoError.  If RkpOK is False, then an error has occurred.
  909.  
  910. Example :
  911.  
  912. ┌─────────────────────────────────┐
  913. │ If RkpOK then                   │
  914. │   WriteLn('Key file written!'); │
  915. └─────────────────────────────────┘
  916.  
  917. If RkpOk returns True, then the message "Key file written!" will be displayed.
  918.  
  919. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 17
  920.  
  921.  
  922. 11.4 - RkpError
  923.  
  924. ┌───────────────────────────┐
  925. │ Function RkpError : Word; │
  926. └───────────────────────────┘
  927.  
  928. RkpError will return the actual error code of the last procedure/function. If
  929. RkpError = NoError, then no error occurred.  If RkpError is between $0001 and
  930. $00FF, then an I/O error occurred during the operation and the result is an
  931. IoResult code.  Otherwise, the error is an RkPlus error (see "Detailed
  932. Constant Information").
  933.  
  934. Example :
  935.  
  936. ┌───────────────────────────────────┐
  937. │ If RkpOK then                     │
  938. │   WriteLn('Key file written.')    │
  939. │ Else                              │
  940. │   WriteLn('Error ',RkpError,'!'); │
  941. └───────────────────────────────────┘
  942.  
  943. If no error occurred, "Key file written." will be displayed.  Otherwise, the
  944. error code will be displayed.
  945.  
  946.  
  947. 11.5 - SetEncode
  948.  
  949. ┌────────────────────────────────────────────────┐
  950. │ Procedure SetEncode(e1, e2, e3 : EncFuncType); │
  951. └────────────────────────────────────────────────┘
  952.  
  953. This procedure will specify the functions that will be called to encode the
  954. registration key.  An encoding function must be defined as FAR {$F+} and must
  955. be of the type EncFuncType.  Each encode function is used to encode one
  956. 4-character section of the final key number (the actual number to character
  957. conversion is handled by RkPlus) and is passed 3 strings, a Byte and an
  958. Integer.  Any or all of these values may be used by any single encode function
  959. to produce a Word result. However, the 3 Strings and the Byte should be used
  960. in at least one of the encode functions.  Otherwise, that value will have no
  961. effect on key generation.  The 3 strings correspond to Rkp.Name1, Rkp.Name2
  962. and Rkp.Name3. The Byte corresponds to the registration level (Rkp.Level) and
  963. the Integer is the expiration date stored as an offset from 1-Jan of BaseYear.
  964. Since the expiration date will be binary-encoded into the key number after the
  965. encode function returns, it is not required that it be used in the encode
  966. function.  If you use Rkp2Enc (for RkPlus 2.x/compatible keys) or Rkp3Enc (for 
  967. RkPlus 3.x keys), you do not need to provide encoding functions or call 
  968. SetEncode (it is handled automatically in the encoding unit's startup code).
  969.  
  970. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 18
  971.  
  972.  
  973. 11.6 - SetKeyFile
  974.  
  975. ┌───────────────────────────────────┐
  976. │ Procedure SetKeyFile(s : String); │
  977. └───────────────────────────────────┘
  978.  
  979. This procedure will specify the name of the key file for RkPlus to use (with
  980. optional path and extension).  The key file will default to the name of the
  981. programme with an extension of '.RKP' (or '.EXE' when using BrandRegInfo) and
  982. the path will default to the path the programme was executed from (if
  983. UseExePath is True) or the current directory (if UseExePath is False).
  984.  
  985. Example :
  986.  
  987. ┌──────────────────────┐
  988. │ UseExePath := False; │
  989. │ SetKeyFile('DEMO1'); │
  990. └──────────────────────┘
  991.  
  992. RkPlus will use 'DEMO1.RKP' (in the current directory) as the key file.  If
  993. BrandRegInfo is called, it will use 'DEMO1.EXE' (in the current directory).
  994.  
  995.  
  996. 11.7 - KeyFileName
  997.  
  998. ┌────────────────────────────────┐
  999. │ Function KeyFileName : String; │
  1000. └────────────────────────────────┘
  1001.  
  1002. This function will return the full path, filename and extension of the key
  1003. file.
  1004.  
  1005. Example :
  1006.  
  1007. ┌───────────────────────┐
  1008. │ UseExePath := True;   │
  1009. │ SetKeyFile('DEMO2');  │
  1010. │ WriteLn(KeyFileName); │
  1011. └───────────────────────┘
  1012.  
  1013. If the current directory is (for example) D:\ and the programme was executed
  1014. from (for example) C:\DEMOS, then it would display "C:\DEMOS\DEMO2.RKP".
  1015.  
  1016. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 19
  1017.  
  1018.  
  1019. 11.8 - ExeFileName
  1020.  
  1021. ┌────────────────────────────────┐
  1022. │ Function ExeFileName : String; │
  1023. └────────────────────────────────┘
  1024.  
  1025. This function will return the full path, filename and extension of the exe
  1026. file that would be branded by BrandRegInfo.  This will be identical to the
  1027. result of KeyFileName, except that the extension will be '.EXE'.
  1028.  
  1029. Example :
  1030.  
  1031. ┌───────────────────────┐
  1032. │ UseExePath := False;  │
  1033. │ SetKeyFile('DEMO3');  │
  1034. │ WriteLn(ExeFileName); │
  1035. └───────────────────────┘
  1036.  
  1037. If the current directory is (for example) D:\ and the programme was executed
  1038. from (for example) C:\DEMOS, then it would display "D:\DEMO3.EXE".
  1039.  
  1040.  
  1041. 11.9 - GetKeyFileSize
  1042.  
  1043. ┌────────────────────────────────────┐
  1044. │ Function GetKeyFileSize : Integer; │
  1045. └────────────────────────────────────┘
  1046.  
  1047. This Function will return the size (in bytes) of the key file.
  1048.  
  1049. Example :
  1050.  
  1051. ┌──────────────────────────────────┐
  1052. │ If (GetKeyFileSize <> 1024) then │
  1053. │   WriteLn('Invalid file size');  │
  1054. └──────────────────────────────────┘
  1055.  
  1056. If the size of the key file is not equal to 1024, then "Invalid File Size"
  1057. will be displayed.
  1058.  
  1059. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 20
  1060.  
  1061.  
  1062. 11.10 - MakeKey
  1063.  
  1064. ┌────────────────────────────────────────────────────┐
  1065. │ Function MakeKey(Name1,Name2,Name3 : String;       │
  1066. │                  Level : Byte;                     │
  1067. │                  ExpYear : Word;                   │
  1068. │                  ExpMonth,ExpDay : Byte) : String; │
  1069. └────────────────────────────────────────────────────┘
  1070.  
  1071. The function MakeKey will return a string containing the 12 digit registration
  1072. key for Names and Level (using the encode functions defined with SetEncode)
  1073. specified, with an encoded expiration date of ExpYear, ExpMonth and ExpDay. If
  1074. you do not wish to use registration levels, simply pass a 0 as the Level
  1075. parameter.  If you do not wish to use expiration dates, simply pass 0 as the
  1076. ExpYear, ExpMonth and ExpDay parameters.  ExpDay will only be used if
  1077. UseExpDays is True.  Unlike the higher-level CreateKey procedure, this
  1078. function does NOT use or change the values of the Rkp record.
  1079.  
  1080. Example :
  1081.  
  1082. ┌──────────────────────────────────────────────────────────────────────┐
  1083. │ Write('Enter name : ');                                              │
  1084. │ ReadLn(n);                                                           │
  1085. │ Write('Enter company : ');                                           │
  1086. │ ReadLn(c);                                                           │
  1087. │ Write('Enter phone number (XXX) XXX-XXXX : ');                       │
  1088. │ ReadLn(p);                                                           │
  1089. │ k := MakeKey(n,c,p,0,0,0,0);    { registration levels and expiration │
  1090. │                                   dates are not being used }         │
  1091. │ WriteLn;                                                             │
  1092. │ WriteLn('Registration key is ',k);                                   │
  1093. └──────────────────────────────────────────────────────────────────────┘
  1094.  
  1095. This will prompt for a name, company name and phone number.  MakeKey is then
  1096. passed the name, company name and phone number, a 0 for the registration level
  1097. and 0 for expiration year, month and day. It will return the key in the
  1098. variable k, which is then displayed.
  1099.  
  1100. It is usually preferable to use the higher-level CreateKey procedure, instead
  1101. of MakeKey.  MakeKey is included to allow for situations where you may need to
  1102. make a key and don't want to affect the values contained in the Rkp record.
  1103.  
  1104. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 21
  1105.  
  1106.  
  1107. 11.11 - ValidKey
  1108.  
  1109. ┌───────────────────────────────────────────────┐
  1110. │ Function ValidKey(Name1,Name2,Name3 : String; │
  1111. │                   Level : Byte;               │
  1112. │                   Key : String) : Boolean;    │
  1113. └───────────────────────────────────────────────┘
  1114.  
  1115. ValidKey will return TRUE if the Key is valid for Name1, Name2, Name3 and
  1116. Level (using the encode functions defined with SetEncode).  If you do not wish
  1117. to use registration levels (and levels weren't used when the key was
  1118. generated), simply pass 0 as the Level parameter.  If ValidKey returns False,
  1119. the key is not valid. Unlike the higher-level procedure VerifyKey, this
  1120. function does NOT use or change the values of the Rkp record.
  1121.  
  1122. Example :
  1123.  
  1124. ┌─────────────────────────────────────────────────────────────────────────┐
  1125. │ Write('Enter your name : ');                                            │
  1126. │ ReadLn(n);                                                              │
  1127. │ Write('Enter your BBS name : ');                                        │
  1128. │ ReadLn(b);                                                              │
  1129. │ Write('Enter your FidoNet address : ');                                 │
  1130. │ ReadLn(f);                                                              │
  1131. │ Write('Enter your registration key : ');                                │
  1132. │ ReadLn(k);                                                              │
  1133. │ If Not ValidKey(n,b,f,0,k) then Begin  { registration levels not used } │
  1134. │   WriteLn('Invalid key!');                                              │
  1135. │   Halt(1);                                                              │
  1136. │ End;                                                                    │
  1137. └─────────────────────────────────────────────────────────────────────────┘
  1138.  
  1139. This programme will prompt the user to enter a name, BBS name, FidoNet address 
  1140. and a registration key.   If the registration key is not valid, the programme 
  1141. will display 'Invalid key!' and Halt with an errorlevel of 1.
  1142.  
  1143. It is usually preferable to use the higher-level VerifyKey procedure, instead 
  1144. of ValidKey.  ValidKey is included to allow for situations where you may need 
  1145. to validate a key and don't want to affect the values contained in the Rkp 
  1146. record.
  1147.  
  1148. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 22
  1149.  
  1150.  
  1151. 11.12 - SetRegInfo
  1152.  
  1153. ┌─────────────────────────────────────────────┐
  1154. │ Procedure SetRegInfo(t,s1,s2,s3,m : String; │
  1155. │                      l : Byte;              │
  1156. │                      ey : Word;             │
  1157. │                      em,ed : Byte;          │
  1158. │                      k : String);           │
  1159. └─────────────────────────────────────────────┘
  1160.  
  1161. SetRegInfo makes the following assignments :
  1162.  
  1163. Rkp.ID       := t         Rkp.Level    := l 
  1164. Rkp.Name1    := s1        Rkp.ExpYear  := ey
  1165. Rkp.Name2    := s2        Rkp.ExpMonth := em
  1166. Rkp.Name3    := s3        Rkp.ExpDay   := ed
  1167. Rkp.Message  := m         Rkp.Key      := k 
  1168.  
  1169. Since the values in the Rkp record may be accessed directly, you will not 
  1170. normally need SetRegInfo.  However, if you are using MakeKey and/or ValidKey 
  1171. with temporary values, you might want to use SetRegInfo as a "short-cut" method
  1172. of assigning those values to the Rkp record.
  1173.  
  1174. Example :
  1175.  
  1176. ┌─────────────────────────────────────────────────────────────────────────┐
  1177. │ Write('Enter your customer ID : ');                                     │
  1178. │ ReadLn(i);                                                              │
  1179. │ Write('Enter your name : ');                                            │
  1180. │ ReadLn(n);                                                              │
  1181. │ Write('Enter your address (line 1) : ');                                │
  1182. │ ReadLn(a1);                                                             │
  1183. │ Write('Enter your address (line 2) : ');                                │
  1184. │ ReadLn(a2);                                                             │
  1185. │ Write('Enter your phone number : ');                                    │
  1186. │ ReadLn(p);                                                              │
  1187. │ Write('Enter your registration key number : ');                         │
  1188. │ ReadLn(k);                                                              │
  1189. │ WriteLn;                                                                │
  1190. │ If Not ValidKey(n,a1,a2,0,k) then      { registration levels not used } │
  1191. │   WriteLn('Registration key number invalid!')                           │
  1192. │ Else                                                                    │
  1193. │   SetRegInfo(i,n,a1,a2,p,0,0,0,0,k);                                    │
  1194. └─────────────────────────────────────────────────────────────────────────┘
  1195.  
  1196. In the above example, the existing registration information (in the Rkp record)
  1197. will not be changed if the registration key is invalid.  Note also that this 
  1198. example uses Rkp.ID (set to the value of the variable i) to store a customer 
  1199. number, and Rkp.Message (set to the value of the variable p) to store the 
  1200. user's phone number.  These values are not used in the encryption of keys and, 
  1201. therefore, may be used to store any information that you want.
  1202.  
  1203. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 23
  1204.  
  1205.  
  1206. 11.13 - CreateKey
  1207.  
  1208. ┌──────────────────────┐
  1209. │ Procedure CreateKey; │
  1210. └──────────────────────┘
  1211.  
  1212. The procedure CreateKey will use the encode functions defined with SetEncode to
  1213. generate a key encrypted from Rkp.Name1, Rkp.Name2, Rkp.Name3, Rkp.Level, 
  1214. Rkp.ExpYear, Rkp.ExpMonth (and Rkp.ExpDay, if UseExpDays is True) with an 
  1215. embedded expiration date, returning the resulting key in Rkp.Key.  If you don't
  1216. wish to use registration levels, simply set Rkp.Level to 0 before calling 
  1217. CreateKey.  If you don't wish to use expiration dates, simply set Rkp.ExpYear, 
  1218. Rkp.ExpMonth and Rkp.ExpDay to 0 before calling CreateKey.
  1219.  
  1220. CreateKey sets the following result code, which will be returned by subsequent 
  1221. calls to RkpError :
  1222.  
  1223. BadTPU     - RKPLUS.TPU is corrupt or has been tampered with
  1224.  
  1225. Example :
  1226.  
  1227. ┌───────────────────────────────────────────────────────────────┐
  1228. │ Write('Enter name : ');                                       │
  1229. │ ReadLn(Rkp.Name1);                                            │
  1230. │ Write('Enter company : ');                                    │
  1231. │ ReadLn(Rkp.Name2);                                            │
  1232. │ Write('Enter phone number (XXX) XXX-XXXX : ');                │
  1233. │ ReadLn(Rkp.Name3);                                            │
  1234. │ Rkp.Level := 0;    { registration levels are not being used } │
  1235. │ Rkp.ExpYear := 0;  { expiration dates are not being used }    │
  1236. │ Rkp.ExpMonth := 0;                                            │
  1237. │ Rkp.ExpDay := 0;                                              │
  1238. │ CreateKey;                                                    │
  1239. │ WriteLn;                                                      │
  1240. │ If RkpOK then                                                 │
  1241. │   WriteLn('Registration key is ',Rkp.Key);                    │
  1242. └───────────────────────────────────────────────────────────────┘
  1243.  
  1244. This will display a warning message and then prompt for a name, company name, 
  1245. and phone number.  CreateKey is called and the key is returned in Rkp.Key, 
  1246. which is then displayed, if no error has occurred.
  1247.  
  1248. Note:  It is possible to use CreateKey to create keys and then to store the 
  1249. contents of the Rkp record into your own configuration file (instead of using 
  1250. SaveRegInfo) and then read the information into your programme and use 
  1251. VerifyKey to verify that the key is valid (rather than using GetRegInfo). This 
  1252. way you can keep registration information in your own configuration file with 
  1253. other programme information, rather than in its own key file.  If using this 
  1254. method, its important that you save Rkp.Name1 (as well as Rkp.Name2, Rkp.Name3 
  1255. and/or Rkp.Level, if used), so that keys will be built correctly. It is not 
  1256. necessary to save Rkp.ExpYear, Rkp.ExpMonth or Rkp.ExpDay, since the expiration
  1257. date is binary-encoded in the key number and extracted by any call to 
  1258. VerifyKey.
  1259.  
  1260. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 24
  1261.  
  1262.  
  1263. 11.14 - VerifyKey
  1264.  
  1265. ┌──────────────────────┐
  1266. │ Procedure VerifyKey; │
  1267. └──────────────────────┘
  1268.  
  1269. The procedure VerifyKey will use the encode functions defined with SetEncode to
  1270. generate a key encrypted from Rkp.Name1, Rkp.Name2, Rkp.Name3 and Rkp.Level; 
  1271. and compare the resulting key to Rkp.Key, setting Rkp.Registered to True if the
  1272. key is valid and not expired. Rkp.ExpYear, Rkp.ExpMonth (and Rkp.ExpDay, if 
  1273. UseExpDays is True) will be set to the expiration date encoded in the key.  If 
  1274. you don't wish to use registration levels, simply set Rkp.Level to 0 before 
  1275. calling VerifyKey.
  1276.  
  1277. VerifyKey sets the following result codes, which will be returned by subsequent
  1278. calls to RkpError :
  1279.  
  1280. InvalidKey - Key is not valid
  1281. ExpiredKey - Key has expired
  1282. BadTPU     - RKPLUS.TPU is corrupt or has been tampered with
  1283.  
  1284. Example :
  1285.  
  1286. ┌─────────────────────────────────────────────────────────┐
  1287. │ Write('Enter your name : ');                            │
  1288. │ ReadLn(Rkp.Name1);                                      │
  1289. │ Write('Enter your BBS name : ');                        │
  1290. │ ReadLn(Rkp.Name2);                                      │
  1291. │ Write('Enter your FidoNet address : ');                 │
  1292. │ ReadLn(Rkp.Name3);                                      │
  1293. │ Write('Enter your registration key : ');                │
  1294. │ ReadLn(Rkp.Key);                                        │
  1295. │ Rkp.Level := 0;    { registration levels are not used } │
  1296. │ VerifyKey;                                              │
  1297. │ If Not RkpOK then Begin                                 │
  1298. │   Case RkpError of                                      │
  1299. │     ExpiredKey : WriteLn('This key has expired!');      │
  1300. │     InvalidKey : WriteLn('This key is invalid!');       │
  1301. │     Else         WriteLn('Error ',RkpError);            │
  1302. │   End;                                                  │
  1303. │   Halt(1);                                              │
  1304. │ End;                                                    │
  1305. └─────────────────────────────────────────────────────────┘
  1306.  
  1307. This programme will prompt the user to enter a name, BBS name, FidoNet address,
  1308. and a registration key.   If the registration key has expired, "This key has 
  1309. expired!" will be displayed.  If the registration key is invalid, "This key is 
  1310. invalid!" will be displayed.  Otherwise, if an error has occurred, an error 
  1311. message will be displayed.  In any case where the key is not validated, the 
  1312. programme will halt with an errorlevel of 1.
  1313.  
  1314. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 25
  1315.  
  1316. 11.15 - GetRegInfo
  1317.  
  1318.  
  1319. ┌───────────────────────┐
  1320. │ Procedure GetRegInfo; │
  1321. └───────────────────────┘
  1322.  
  1323. GetRegInfo will read the key file (if it exists) and set the value of the
  1324. following variables :
  1325.  
  1326. Rkp.Name1    - set to primary registration name
  1327. Rkp.Name2    - set to secondary registration name
  1328. Rkp.Name3    - set to third registration name
  1329. Rkp.Level    - set to registration level (0 if not used)
  1330. Rkp.ExpYear  - set to expiration year (0 if not used)
  1331. Rkp.ExpMonth - set to expiration month (0 if not used)
  1332. Rkp.ExpDay   - set to expiration day (0 if not used or UseExpDays is False)
  1333. Rkp.Key      - set to 12 digit alphanumeric registration key
  1334.  
  1335. GetRegInfo would generally be called near the beginning of a programme (after 
  1336. SetEncode has been called to define the encode functions and SetKeyFile has 
  1337. been called to define the key file).
  1338.  
  1339. GetRegInfo sets the following result codes, which will be returned by
  1340. subsequent calls to RkpError :
  1341.  
  1342. ExpiredKey  - Registration key has expired
  1343. InvalidKey  - programme is registered with an invalid key
  1344. FileError   - File is corrupt
  1345. InvalidFile - File is not a RkPlus registration key file
  1346. BadTPU      - RKPLUS.TPU is corrupt or has been tampered with
  1347.  
  1348. Example :
  1349.  
  1350. ┌────────────────────────────────────────┐
  1351. │ GetRegInfo;                            │
  1352. │ If Rkp.Registered then                 │
  1353. │   WriteLn('Registered to ',Rkp.Name1); │
  1354. └────────────────────────────────────────┘
  1355.  
  1356. GetRegInfo will read the key file (specified in an earlier call to SetKeyFile).
  1357. If the programme is registered, Rkp.Registered will be True and the programme 
  1358. will display the name of the person that the programme is registered to.
  1359.  
  1360. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 26
  1361.  
  1362. 11.16 - SaveRegInfo
  1363.  
  1364.  
  1365. ┌────────────────────────┐
  1366. │ Procedure SaveRegInfo; │
  1367. └────────────────────────┘
  1368.  
  1369. The procedure SaveRegInfo will use the encode functions defined with SetEncode 
  1370. to generate a key encrypted from Rkp.Name1, Rkp.Name2, Rkp.Name3, Rkp.Level, 
  1371. Rkp.ExpYear, Rkp.ExpMonth (and Rkp.ExpDay, if UseExpDays is True). It will them
  1372. compare the resulting key with Rkp.Key and write the contents of the Rkp record
  1373. to the keyfile.  If you don't wish to use registration levels, simply set 
  1374. Rkp.Level to 0 before calling SaveRegInfo. If you don't wish to use expiration 
  1375. dates, simply set Rkp.ExpYear, Rkp.ExpMonth, and Rkp.ExpDay to 0 before calling
  1376. SaveRegInfo.
  1377.  
  1378. SaveRegInfo sets the following result codes, which will be returned by
  1379. subsequent calls to RkpError :
  1380.  
  1381. InvalidKey - Key is not valid
  1382. FileError  - Unable to write key file
  1383. BadTPU     - RKPLUS.TPU is corrupt or has been tampered with
  1384.  
  1385. Example :
  1386.  
  1387. ┌────────────────────────────────────────────────────────────────────┐
  1388. │ Write('Enter your name : ');                                       │
  1389. │ ReadLn(Rkp.Name1);                                                 │
  1390. │ Write('Enter your company name : ');                               │
  1391. │ ReadLn(Rkp.Name2);                                                 │
  1392. │ Write('Enter your registration key : ');                           │
  1393. │ ReadLn(Rkp.Key);                                                   │
  1394. │ Rkp.Level := 0;    { registration levels not used }                │
  1395. │ Rkp.ExpYear := 0;  { expiration dates not used }                   │
  1396. │ Rkp.ExpMonth := 0;                                                 │
  1397. │ Rkp.ExpDay := 0;                                                   │
  1398. │ SaveRegInfo;                                                       │
  1399. │ If Not RkpOK then                                                  │
  1400. │   WriteLn('Invalid Key or File Error.  Programme not installed.'); │
  1401. └────────────────────────────────────────────────────────────────────┘
  1402.  
  1403. This programme will prompt the user for a name, company name, and a 
  1404. registration key.  SaveRegInfo will then be called. If Rkp.Registered is not 
  1405. True, then an error occurred and no key file was written (the programme 
  1406. displays 'Invalid Key or File Error.  Programme not installed.'). Otherwise, 
  1407. the key file was written.
  1408.  
  1409. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 27
  1410.  
  1411.  
  1412. 11.17 - BrandRegInfo
  1413.  
  1414. ┌─────────────────────────┐
  1415. │ Procedure BrandRegInfo; │
  1416. └─────────────────────────┘
  1417.  
  1418. The procedure BrandRegInfo will use the encode functions defined with SetEncode
  1419. to generate a key encrypted from Rkp.Name1, Rkp.Name2, Rkp.Name3, Rkp.Level, 
  1420. Rkp.ExpYear, Rkp.ExpMonth (and Rkp.ExpDay, if UseExpDays is True). It will them
  1421. compare the resulting key with Rkp.Key and brand the contents of the Rkp record
  1422. to the EXE file.  If you don't wish to use registration levels, simply set 
  1423. Rkp.Level to 0 before calling SaveRegInfo. If you don't wish to use expiration 
  1424. dates, simply set Rkp.ExpYear, Rkp.ExpMonth, and Rkp.ExpDay to 0 before calling
  1425. SaveRegInfo.
  1426.  
  1427. BrandRegInfo sets the following result codes, which will be returned by
  1428. subsequent calls to RkpError :
  1429.  
  1430. InvalidKey  - Key is not valid
  1431. InvalidFile - EXE file is NOT an RkPlus 3.x file
  1432. BadTPU      - RKPLUS.TPU is corrupt or has been tampered with
  1433.  
  1434. Example :
  1435.  
  1436. ┌──────────────────────────────────────────────────────────────────┐
  1437. │ Write('Enter your name : ');                                     │
  1438. │ ReadLn(Rkp.Name1);                                               │
  1439. │ Write('Enter your company name : ');                             │
  1440. │ ReadLn(Rkp.Name2);                                               │
  1441. │ Write('Enter your registration key : ');                         │
  1442. │ ReadLn(Rkp.Key);                                                 │
  1443. │ Rkp.Level := 0;    { registration levels not used }              │
  1444. │ Rkp.ExpYear := 0;  { expiration dates not used }                 │
  1445. │ Rkp.ExpMonth := 0;                                               │
  1446. │ Rkp.ExpDay := 0;                                                 │
  1447. │ BrandRegInfo;                                                    │
  1448. │ If Not Rkp.Registered then                                       │
  1449. │   WriteLn('Invalid Key or File Error.  Programme not branded.'); │
  1450. └──────────────────────────────────────────────────────────────────┘
  1451.  
  1452. This programme will prompt the user for a name, company name, and a 
  1453. registration key.  SaveRegInfo will then be called. If Rkp.Registered is not 
  1454. True, then an error occurred and the EXE file was not modified (the programme 
  1455. displays 'Invalid Key or File Error.  Programme not branded.'). Otherwise, the 
  1456. EXE file was modified to include the registration information.
  1457.  
  1458. Note:  BrandRegInfo has NOT been tested with any EXE-compression programmes. 
  1459. Because of the way that RkPlus searches for it's ID stamp, it will most likely 
  1460. NOT work on "compressed" files.  Calls to BrandRegInfo (when the EXE file set 
  1461. with SetKeyFile has been "compressed") will probably set the result code of 
  1462. InvalidFile.
  1463.  
  1464. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 28
  1465.  
  1466.  
  1467. 12.0 - Additional Information On RkPlus
  1468.  
  1469. For more information on using RkPlus, see the sample Turbo Pascal (tm) 
  1470. programmes that are distributed with the archive, or contact me at any of the 
  1471. locations listed below.
  1472.  
  1473.  
  1474. 13.0 - RkPlus Source Code Availability
  1475.  
  1476. Starting with version 3.0, the source code to RkPlus (as well as the smaller
  1477. rKey unit) is available to licenced users.  Since SetEncode was added,
  1478. allowing programmers to write their own encoding functions, the security of
  1479. programmes written with RkPlus are no longer compromised by releasing the
  1480. source code.  See REGISTER.DOC for more information.
  1481.  
  1482.  
  1483. 14.0 - What's Next For RkPlus?
  1484.  
  1485. With the completion of the BrandRegInfo procedure [3.0], RkPlus does just about
  1486. everything that I want it to do.  So, unless I get some suggestions from other 
  1487. users, I probably won't do much more with it (except correct any bugs that 
  1488. might show up and add compatibility with new versions of TP).
  1489.  
  1490. I have started work on RkpQB 1.0 (the QuickBASIC version of RkPlus) and plan to
  1491. start RkpC 1.0 (the C version of RkPlus) as soon as RkpQB is finished.
  1492.  
  1493. If you have any suggestions for features that you'd like to see in future 
  1494. versions of RkPlus, feel free to contact me via any of the methods below. I 
  1495. welcome questions, comments and suggestions of any kind.
  1496.  
  1497. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 29
  1498.  
  1499.  
  1500. 15.0 - ShareWare Notice And Registration
  1501.  
  1502. RkPlus is Shareware.  You may copy and distribute RKPLUS30.ZIP freely.  All I 
  1503. ask is that you include all of the original files, unmodified, and that you do 
  1504. not charge for the distribution of RkPlus itself.  If you use RkPlus to develop 
  1505. software, you are required to register BEFORE releasing it (see REGISTER.DOC 
  1506. for registration information).
  1507.  
  1508. There are no royalties for the distribution of programmes that are written with 
  1509. RkPlus.  A single registration fee entitles you to write and distribute any 
  1510. number of programmes using RkPlus.
  1511.  
  1512. Questions, comments, and suggestions are welcome.
  1513.  
  1514. Send US Mail to:
  1515.   Scott Davis
  1516.   Serious Cybernetics
  1517.   Box 35
  1518.   Alto, GA 30510-0035
  1519.   USA
  1520.  
  1521.  
  1522. 16.0 - RkPlus Support
  1523.  
  1524.      The latest version of RkPlus can always be downloaded from our primary 
  1525. support BBS below.
  1526.  
  1527.                  P h o e n i x   S t a r F i g h t e r   B B S
  1528.             The Home of "Serious Cybernetics"  -  FidoNet 1:3616/20
  1529.            (404) 869-3410  -  Lula, Georgia, USA  -  24 Hour Service
  1530.      Supporting 3/12/24/48/96/144/HST/v32/v32b/v42/v42b via USR HST/DS Modem
  1531.                      Sysops:  Danny Sosebee and Scott Davis
  1532.                      All Users Welcome!   Immediate Access!
  1533.  
  1534. We have the following "magic" filenames set up for FidoNet file requests :
  1535.  
  1536.   "FILES"  will request the current master file listing (updated nightly)
  1537.   "RKPLUS" will request the latest version of RkPlus
  1538.   "RKHELP" will request the latest version of RkPlus Help
  1539.   "RKEY"   will request the latest version of rKey
  1540.   "RK"     will request the latest version of ALL rKey/RkPlus files
  1541.  
  1542. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 30
  1543.  
  1544.  
  1545. 17.0 - Credits
  1546.  
  1547. I'd like to thank Danny Sosebee (Sysop of Phoenix StarFighter BBS) for allowing 
  1548. me to distribute my software through his BBS, as well as for helping me rewrite 
  1549. and "clean-up" this documentation.  Also, I'd like to thank Ed Ivey (Sysop of 
  1550. Ed's Place BBS - 404-532-1978 - FidoNet Node 1:3616/1) for his continued 
  1551. support and assistance with my little software "projects".
  1552.  
  1553. In addition, I'd like to thank the following users of RkPlus who have made
  1554. valuable suggestions :
  1555.  
  1556. Nick Herceg - Made MANY excellent suggestions (too many to list here), which
  1557. led directly to the rewriting of rKey as RkPlus. [2.0]
  1558.  
  1559. Mike Janke - The FIRST user to register RkPlus (thanks, Mike!).  He also
  1560. suggested that the key file extension (previously .REG) be definable.  [2.3]
  1561.  
  1562. Luke Kolin - Suggested a definable key file size (padded with random
  1563. characters) to confuse potential hackers. [2.3]
  1564.  
  1565. Mats Engstrom - Found and reported bugs in the version 2.x encoding functions
  1566. and in the key validation routine when the expiration month was set to 12
  1567. (December).  [2.4]
  1568.  
  1569. Tom Thayer - Reported the naming conflict between the registration record and
  1570. some programmes/units that use Reg to contain registers.  Also, made me aware
  1571. of how vulnerable RKPLUS.TPU was to "tampering".  [2.4]
  1572.  
  1573. Aaron Blanton - Made me aware of the possibility of programmers/hackers
  1574. examining the EXE file to determine the constants used in the version 2.x
  1575. encoding functions.  [2.4]  This led directly to the encryption method
  1576. used in Rkp3Enc and programmer-definable encode functions. [3.0]
  1577.  
  1578. Finally, I'd like to thank the following REGISTERED users of RkPlus whose
  1579. support keeps the ShareWare concept alive :
  1580.  
  1581.   Mike Janke
  1582.   Joe Dabrowski (Ice Palace Communications)
  1583.   Jeffrey Howard
  1584.   Jack Ridgway
  1585.   Dirk Zender (Dezet)
  1586.   Dan Bernasconi
  1587.   William Burlew (db Computer Consultants, Inc)
  1588.   Stephan Patterson (LOGISTRAL, INC)
  1589.   Jakob Paikin (Paikin Data)
  1590.   Ed Ivey
  1591.  
  1592. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 31
  1593.  
  1594.  
  1595. 18.0 - Turbo Pascal (tm) Units from Serious Cybernetics
  1596.  
  1597. The following Turbo Pascal (tm) units are available from Serious Cybernetics :
  1598.  
  1599.   CmdParse 1.0 - TP55/60/TPW10/15 Command Line Parsing Unit
  1600.   rKey 1.7     - TP50/55/60 Simple Registration Key Unit
  1601.   RkPlus 3.0   - TP50/55/60/TPW10/15 Enhanced Registration Key Unit
  1602.   StrLib 1.4   - TP String Library Unit (with source)
  1603.  
  1604.  
  1605. 19.0 - Other Recommended Turbo Pascal (tm) Units
  1606.  
  1607. I use units from Object Professional (tm) from TurboPower Software in almost 
  1608. every programme that I write, and strongly recommend it (as well as any other 
  1609. units from Turbo Power) to any Turbo Pascal (tm) programmer.  ObjectPro has
  1610. been, for me, the single most useful collection of general purpose units
  1611. that I have ever run across.
  1612.  
  1613.  
  1614. 20.0 - Copyright Notices
  1615.  
  1616. RkPlus (c) 1991-93 Serious Cybernetics
  1617. Rkp2Enc (c) 1990-93 Serious Cybernetics
  1618. Rkp3Enc (c) 1993 Serious Cybernetics
  1619. RkpQB, RkpC (c) 1992-93 Serious Cybernetics
  1620. rKey, StrLib (c) 1990-92 Serious Cybernetics
  1621. Turbo Pascal (c) 1983-89 Borland International
  1622. Object Professional (c) 1989 TurboPower Software
  1623. Microsoft Windows (c) 1985-92 Microsoft Corporation
  1624.  
  1625. RkPlus 3.0 - Turbo Pascal (tm) Registration Key Unit                    Page 32
  1626.  
  1627.  
  1628. 21.0 - Index
  1629.  
  1630.   D e s c r i p t i o n           Page  ║  D e s c r i p t i o n           Page
  1631.   -----------------------------   ----  ║  -----------------------------   ----
  1632.   AccessDenied ...................  6   ║  RKP55TPU.ZIP ...................  1 
  1633.   Approaches to using RkPlus .....  1   ║  RKP60TPU.ZIP ...................  1 
  1634.                                         ║  rKey ...........................  1 
  1635.   BadSystemDate .................. 16   ║  RKPLUS30.ZIP ...................  1 
  1636.   BadTPU .........................  7   ║  Randomize ......................  9 
  1637.   BaseYear .......................  8   ║  Read Only File .................  6 
  1638.   BrandRegInfo ................... 27   ║  RecordNotFound .................  6 
  1639.                                         ║  RkPlus .........................  1 
  1640.   CONFIG.SYS .....................  6   ║  RkPlusVer ...................... 15 
  1641.   Constant List ..................  3   ║  Rkp ............................  4 
  1642.   CreateKey ...................... 23   ║  Rkp.ExpDay ..................... 14 
  1643.                                         ║  Rkp.ExpMonth ................... 14 
  1644.   EncFuncType ....................  5   ║  Rkp.ExpYear .................... 14 
  1645.   ExeFileName .................... 19   ║  Rkp.ID ......................... 10 
  1646.   Expiration Dates ...............  8   ║  Rkp.Key ........................ 15 
  1647.   Expiration Days ................  8   ║  Rkp.Level ...................... 13 
  1648.   ExpiredKey .....................  7   ║  Rkp.Message .................... 12 
  1649.                                         ║  Rkp.Name1 ...................... 10 
  1650.   FileNotFound ...................  5   ║  Rkp.Name2 ...................... 11 
  1651.                                         ║  Rkp.Name3 ...................... 12 
  1652.   GetKeyFileSize ................. 19   ║  Rkp.Registered .................  9 
  1653.   GetRegInfo ..................... 25   ║  Rkp2Enc ........................  1 
  1654.                                         ║  Rkp3Enc ........................  1 
  1655.   InvalidFile ....................  6   ║  RkpError ....................... 17 
  1656.   InvalidKey .....................  7   ║  RkpOK .......................... 16 
  1657.   InvalidParameter ...............  6   ║  RkpRec .........................  4 
  1658.   InvalidRecord ..................  6   ║                                      
  1659.   IoResult ....................... 17   ║  SaveRegInfo .................... 26 
  1660.                                         ║  SetEncode ...................... 17 
  1661.   KeyFileName .................... 18   ║  SetKeyFile ..................... 18 
  1662.   KeyFileSize ....................  9   ║  SetRegInfo ..................... 22 
  1663.                                         ║  Shared File ....................  6 
  1664.   MakeKey ........................ 20   ║                                      
  1665.   Methods of using RkPlus ........  2   ║  TooManyFiles ...................  6 
  1666.                                         ║  Type Definition List ...........  2 
  1667.   NoEncodeFunc ...................  7   ║                                      
  1668.   NoError ........................  5   ║  UseExePath .....................  8 
  1669.                                         ║  UseExpDays .....................  8 
  1670.   PathNotFound ...................  5   ║                                      
  1671.   Procedures and Functions List ..  4   ║  ValidKey ....................... 21 
  1672.                                         ║  Variable List ..................  3 
  1673.   RKP10TPU.ZIP ...................  1   ║  VerifyKey ...................... 24 
  1674.   RKP15TPU.ZIP ...................  1   ║  VersionMismatch ................  7
  1675.   RKP50TPU.ZIP ...................  1   ║
  1676.